{% extends 'ApiCloud/Base/layout.common.html.twig' %}

{% block main %}
    {% include "ApiCloud/Base/inc.head.light.html.twig" with {title:"选择地址",back:1} %}
    <div class="pad5 c11">
        {#默认地址#}
        <div class="padtb5 c12 fs8">默认地址</div>
        <div class="addrBj50 padb3 flex-r flex-fill pos-r">
            <div class="pad10 tac c12 round3 bcf flex1" v-if="!isTrue(defAddress)">尚未设置</div>
            <div class="bcf lh2 pad10 fs8 flex1" v-if="isTrue(defAddress)">
                <div class="flex-r fs9">
                    <div>  [[defAddress.province]]</div>
                    <div>  [[defAddress.city]]</div>
                    <div>  [[defAddress.area]]</div>
                </div>
                <div>
                    [[defAddress.address]]
                </div>
                <div class="flex-r">
                    <div class="fs8 c12" v-for="tag,index in defAddress.tags">
                        <span class="padlr3" v-if="index >0">/</span>
                        [[tag]]
                    </div>
                </div>
            </div>
            <div class="fs16 c1 bcf flcc bdrso bdc1 bdw8">
                <span class="fa fa-caret-left"></span>
            </div>
            <mu-ripple  @click="setAddress(defAddress)"></mu-ripple>
        </div>

        {#其他地址列表#}
        <div>
            <div class="padt10 c12 fs8 flrc">
                <div class="flex1">全部地址</div>
                <div>
                    <mu-button @click="goto('myAddressAdd',{id:0})" flat :color="c1">新增</mu-button>
                </div>
            </div>
            <div class="bcf lh2 fs8 mart5 flex-r flex-fill pos-r" v-for="item in list">
                <div class="flex1 pad10">
                    <div class="flex-r fs9">
                        <div>  [[item.province]]</div>
                        <div>  [[item.city]]</div>
                        <div>  [[item.area]]</div>
                    </div>
                    <div>
                        [[item.address]]
                    </div>
                    <div class="flex-r">
                        <div class="fs8 c12" v-for="tag,index in item.tags">
                            <span class="padlr3" v-if="index >0">/</span>
                            [[tag]]
                        </div>
                    </div>
                </div>
                <div class="fs16 c1 bcf flcc bdrso bdc1 bdw8">
                    <span class="fa fa-caret-left"></span>
                </div>
                <mu-ripple  @click="setAddress(item)"></mu-ripple>
            </div>
        </div>
    </div>

{% endblock %}
